package ability

import (
	"sjy/customcmd/src/constants"
	"sjy/customcmd/src/utils"
)

var HelpInstanse = FuncManager.Register(
	&HelpClass{
		FuncObjBase: &FuncObjBase{
			ClassName: constants.Help.Code,
		},
	},
)

type HelpClass struct {
	*FuncObjBase // 嵌入 BaseStruct
}

func (r *HelpClass) Execute(obj *FuncEntity) {
	utils.Info("详细帮助文档：https://gitee.com/mdsSJY/custom-cmd/blob/master/Readme.md")
	utils.Info("你可以输入以下命令：")
	for _, obj := range constants.MainCmds {
		utils.Info("%s", obj.Desc())
	}

}
